GBML manual / Device

rumble_stop

Stops the rumble motor at once, however much of a rumble call was left.

Works differently on Game Boy - A Game Boy game rumbles only if its project is set to a rumble cartridge (Settings: Rumble cartridge); in any other game rumble and rumble_stop do nothing.

Works differently on Game Boy Color - A Game Boy Color game rumbles only if its project is set to a rumble cartridge (Settings: Rumble cartridge); in any other game rumble and rumble_stop do nothing.

Sega Genesis: not available

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

rumble_stop()

Returns

Nothing.

Description

Stops the rumble motor right now, however many frames of a rumble were left.

You never need this to make a rumble end, because every rumble call ends by itself. Use it when something should cut a rumble short: the player pauses, a cutscene starts, a hit that was shaking the cartridge is canceled.

Calling it when nothing is rumbling does nothing at all. It does not even touch the cartridge.

Example

// B stops any rumble that is running.
if (btn_pressed(BTN_B)) {
    rumble_stop();
}

A Step event that checks B every frame. Press B in the middle of a long rumble and the motor stops on that frame.

On the GBA

Switches the motor off and forgets the rest of the countdown. Calling it when nothing is rumbling does nothing at all - it does not even touch the cartridge.

See also: rumblebtn_pressed